package com.ruoyi.TraditionalCultureSys.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.TraditionalCultureSys.mapper.RedRelicsMapper;
import com.ruoyi.TraditionalCultureSys.domain.RedRelics;
import com.ruoyi.TraditionalCultureSys.service.IRedRelicsService;

/**
 * 红色经典Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-06-24
 */
@Service
public class RedRelicsServiceImpl implements IRedRelicsService 
{
    @Autowired
    private RedRelicsMapper redRelicsMapper;

    /**
     * 查询红色经典
     * 
     * @param id 红色经典主键
     * @return 红色经典
     */
    @Override
    public RedRelics selectRedRelicsById(Long id)
    {
        return redRelicsMapper.selectRedRelicsById(id);
    }

    /**
     * 查询红色经典列表
     * 
     * @param redRelics 红色经典
     * @return 红色经典
     */
    @Override
    public List<RedRelics> selectRedRelicsList(RedRelics redRelics)
    {
        return redRelicsMapper.selectRedRelicsList(redRelics);
    }

    /**
     * 新增红色经典
     * 
     * @param redRelics 红色经典
     * @return 结果
     */
    @Override
    public int insertRedRelics(RedRelics redRelics)
    {
        return redRelicsMapper.insertRedRelics(redRelics);
    }

    /**
     * 修改红色经典
     * 
     * @param redRelics 红色经典
     * @return 结果
     */
    @Override
    public int updateRedRelics(RedRelics redRelics)
    {
        return redRelicsMapper.updateRedRelics(redRelics);
    }

    /**
     * 批量删除红色经典
     * 
     * @param ids 需要删除的红色经典主键
     * @return 结果
     */
    @Override
    public int deleteRedRelicsByIds(Long[] ids)
    {
        return redRelicsMapper.deleteRedRelicsByIds(ids);
    }

    /**
     * 删除红色经典信息
     * 
     * @param id 红色经典主键
     * @return 结果
     */
    @Override
    public int deleteRedRelicsById(Long id)
    {
        return redRelicsMapper.deleteRedRelicsById(id);
    }

    @Override
    public List<RedRelics> getAllRedRelics() {
        return redRelicsMapper.getAllRedRelics();
    }
}
